﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 计数器
public class TriggerCounter : TriggerBase
{
    public int needCount;
    public int curCount;
    public override void InitTrigger()
    {
        base.InitTrigger();
        curCount = 0;
    }

    public void AddCount1()
    {
        curCount++;
        Judge();
    }

    private void Judge()
    {
        if (curCount >= needCount)
        {
            OnTrigger();
        }
    }


}
